<template>
  <div id="app">
    <img src="./assets/logo.png">
<!--    注意:后面要紧跟MyTitle-->
    <MyContent :MyTitle="msg" :btnfn="dianji"/>
    <ul class="nav nav-tabs">
      <li role="presentation" class="active"><router-link to="/Home">首页</router-link> </li>
      <li role="presentation"><router-link to="/Product/2">商品列表</router-link></li>
      <button type="button" @click="btnfn">点我</button>
    </ul>
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'App',
  data(){
    return {
      msg:"保质期三天"
    }
  },
  methods:{
    dianji: function (data) {
      this.msg = data;
    },
    btnfn:function () {
      this.$router.push("/Product/3")
    }
  }
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
